#include <iostream>
#include <string>
#include <map>
using namespace std;

class Solution
{
public:
    bool isAnagram(string s, string t)
    {
        if(s.size() != t.size())
            return false;
        map<char, int> m;
        for (char c : s)
        {
            if (m.count(c))
                m[c]++;
            else
                m[c] = 1;
        }
        for (char c : t)
        {
            if (m.count(c))
            {
                m[c]--;
                if (m[c] == 0)
                    m.erase(c);
            }
            else
                return false;
        }
        return m.empty();
    }
};
int main()
{
    cout << "Code242" << endl;
    Solution s;
    return 0;
}